<?php

//总配置文件
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING);
date_default_timezone_set('Asia/Shanghai');
$dir = dirname(__FILE__);
$deviceType = "local";
define('DEV_NAME', $deviceType);
switch ($deviceType) {
    case "pro":
        $dir .= "/pro";
        break;
    case "dev":
        $dir .= "/dev";
        break;
    case "test":
        $dir .= "/test";
        break;
    case "local":
        $dir .= "/local";
        break;
    default :
        $dir .= "/pro";
        break;
}
//加载私有的域名常量文件
include_once $dir . '/domain_defines.php';
//常量定义一次就不在修改,所以优先使用全局常量
//加载全局的常量文件
include_once dirname(__FILE__) . '/defines.php';
//加载私有的常量文件
include_once $dir . '/defines.php';
$dbconfig = (include $dir . '/database.php');
define('DATABASE_PATH', $dir . '/database.php');
$cacheconfig = (include $dir . '/cache.php');
define('CACHE_PATH', $dir . '/cache.php');
return array_merge($dbconfig, $cacheconfig);
?>
